package com.cloudlinkscm.loms.services.base.notify.dto.email;

import com.cloudlinkscm.loms.framework.core.constant.SwaggerExample;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.NotEmpty;

import java.util.Date;

/**
 * @author : tac
 * @date : 2017/6/14
 */
public class EmailMessageDto {
    /**
     * @deprecated default constructor for spring mvc
     */
    public EmailMessageDto() {
        this.isReturn = false;
        this.isPriority = false;
        this.isSsl = false;
    }

    public EmailMessageDto(String senderName, String recipientName, String recipientMail, String subject) {
        this(senderName, recipientName, recipientMail, subject, "", "[]");
    }

    public EmailMessageDto(String senderName, String recipientName, String recipientMail, String subject, String body) {
        this(senderName, recipientName, recipientMail, subject, body, "[]");
    }

    public EmailMessageDto(String senderName, String recipientName, String recipientMail, String subject, String body, String recipientCcls) {
        this();
        this.senderName = senderName;
        this.recipientName = recipientName;
        this.recipientMail = recipientMail;
        this.subject = subject;
        this.body = body;
        this.recipientCcls = recipientCcls;
    }

    @ApiModelProperty(position = 0, value = "发送人邮箱（接收邮件回复时使用）", required = false, example = "xxx@hercules-logistic.com")
    private String senderMail;
    @ApiModelProperty(position = 10, value = "发送人姓名", required = true, example = "tac")
    @NotEmpty
    private String senderName;
    @ApiModelProperty(position = 20, value = "接收人邮箱", required = true, example = "137****1234@163.com")
    @NotEmpty
    private String recipientMail;
    @ApiModelProperty(position = 30, value = "接收人姓名", required = true, example = "anit")
    @NotEmpty
    private String recipientName;
    @ApiModelProperty(position = 40, value = "抄送人列表(json array)", required = false, example = "[{\"recipient\": \"tac\",\"mail\":\"51*******20@qq.com\"}]")
    private String recipientCcls;
    @ApiModelProperty(position = 50, value = "邮件主题", required = true, example = "mail title")
    @NotEmpty
    private String subject;
    @ApiModelProperty(position = 60, value = "邮件正文", required = true, example = "this is mail body")
    @NotEmpty
    private String body;
    //todo::
    @ApiModelProperty(position = 70, value = "附件名称（未完成）", required = false, example = "this is mail body", hidden = true)
    private String mailFile;
    @ApiModelProperty(position = 80, value = "是否加急", required = true, example = "false")
    @NotEmpty
    private Boolean isPriority;
    @ApiModelProperty(position = 90, value = "是否通过ssl发送", required = true, example = "false")
    @NotEmpty
    private Boolean isSsl;
    @ApiModelProperty(position = 100, value = "指定发送时间（为null时表示立即发送）", required = false, example = SwaggerExample.DATE)
    private Date sendDate;
    //todo::
    @ApiModelProperty(position = 110, value = "链接头（未完成）", required = false, example = "www.abc.com/1.html", hidden = true)
    private String urlHead;
    //todo::
    @ApiModelProperty(position = 120, value = "是否需要回执（未完成）", required = true, example = "false", hidden = true)
    private Boolean isReturn;
    //todo::
    @ApiModelProperty(position = 130, value = "回复url（未完成）", required = false, example = "false", hidden = true)
    private String replyUrl;

    public String getSenderMail() {
        return senderMail;
    }

    public void setSenderMail(String senderMail) {
        this.senderMail = senderMail;
    }

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    public String getRecipientName() {
        return recipientName;
    }

    public void setRecipientName(String recipientName) {
        this.recipientName = recipientName;
    }

    public String getRecipientMail() {
        return recipientMail;
    }

    public void setRecipientMail(String recipientMail) {
        this.recipientMail = recipientMail;
    }

    public String getRecipientCcls() {
        return recipientCcls;
    }

    public void setRecipientCcls(String recipientCcls) {
        this.recipientCcls = recipientCcls;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getMailFile() {
        return mailFile;
    }

    public void setMailFile(String mailFile) {
        this.mailFile = mailFile;
    }

    public Boolean getPriority() {
        return isPriority;
    }

    public void setPriority(Boolean priority) {
        isPriority = priority;
    }

    public Boolean getSsl() {
        return isSsl;
    }

    public void setSsl(Boolean ssl) {
        isSsl = ssl;
    }

    public Date getSendDate() {
        return sendDate;
    }

    public void setSendDate(Date sendDate) {
        this.sendDate = sendDate;
    }

    public String getUrlHead() {
        return urlHead;
    }

    public void setUrlHead(String urlHead) {
        this.urlHead = urlHead;
    }

    public Boolean getReturn() {
        return isReturn;
    }

    public void setReturn(Boolean aReturn) {
        isReturn = aReturn;
    }

    public String getReplyUrl() {
        return replyUrl;
    }

    public void setReplyUrl(String replyUrl) {
        this.replyUrl = replyUrl;
    }
}
